//
//  receiveTelepLight.m
//  tcpoctest
//
//  Created by apple on 13-8-1.
//  Copyright (c) 2013年 gump. All rights reserved.
//

#import "receiveTelepLight.h"
#import "TelepathyDataSource.h"

@implementation receiveTelepLight

-(void)processreceive
{
    //返回  51char(1),2char(1)，回值char(1)1，
    //成功, 2失败,蜡烛数量char(1),金币长度(int),金币char(x)
    
    [DataControl shareControl].TelepathyDS.LightBackType = [logicsb ReadChar];
    [DataControl shareControl].TelepathyDS.iCandle = [logicsb ReadIntWithTT:NTT_BIG2SMALL];
    int il = [logicsb ReadIntWithTT:NTT_BIG2SMALL];
    [DataControl shareControl].personDS.uinfo.strcoin = [logicsb ReadStringWithLength:il];
    [[DataControl shareControl] SetUpdateUserType:UUT_STRCOIN];
    [[DataControl shareControl].LCDS addLogicCommand:LC_UPDATEUIDB];
    
    [self ShowLog];
    
    EACHOTHER_LOG(@"receive length %d mainindex %d secindex %d %@ \r\n"
           ,logicsb.mrestLength
           ,imainIndex
           ,isecIndex
           ,self);
    
    [[DataControl shareControl].UICommendDS addUICommand:UC_TELEP_GETLIGHT];
}

@end
